package example.hello_security.Entity;

import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;


@Data
public class UserEntity {
    String username;
    String password;
    int id;

//    @Bean
//    public UserDetailsService userDetailsService() {
//        InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
//        manager.createUser(
//                User
//                        .withDefaultPasswordEncoder()
//                        .username(username)
//                        .password(password)
//                        .roles("USER")
//                        .build());
//        return manager;
//    }
}
